﻿using BoriPeter.FatSecret.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BoriPeter.FatSecret.Messages
{
    /// <summary>
    /// Returns saved food diary entries for the user according to the filter specified. 
    /// This method can be used to return all food diary entries recorded on a nominated date 
    /// or a single food diary entry with a nominated food_entry_id.
    /// </summary>
    public class FoodEntriesGet : FatSecretMessageBase<FoodEntriesGetModel>
    {
        private const string METHOD_VALUE = "food_entries.get";
        private const string DATE = "date";
        private const string FOOD_ENTRY_ID = "food_entry_id";

        public FoodEntriesGet(DateTime _date) : base()
        {
            AddRequestParameter(METHOD, METHOD_VALUE);
            AddRequestParameter(DATE, _date);
        }

        public FoodEntriesGet(int _foodEntryId) : base()
        {
            AddRequestParameter(METHOD, METHOD_VALUE);
            AddRequestParameter(FOOD_ENTRY_ID, _foodEntryId);
        }
    }
}
